home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / GemsI / Src / Sturm / solve.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-16  |  710 b   |  41 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * solve.h
  4.  *
  5.  *    some useful constants and types.
  6.  */
  7. #define         MAX_ORDER          12    
  8. /* maximum order for a polynomial */
  9.     
  10. #define          RELERROR              1.0e-14
  11. /* smallest relative error we want */
  12.  
  13. #define          MAXPOW            32        
  14. /* max power of 10 we wish to search to */
  15.  
  16. #define          MAXIT             800        
  17. /* max number of iterations */
  18.  
  19. /* a coefficient smaller than SMALL_ENOUGH is considered to 
  20.    be zero (0.0). */
  21.  
  22. #define          SMALL_ENOUGH        1.0e-12
  23.  
  24.  
  25. /*
  26.  * structure type for representing a polynomial
  27.  */
  28. typedef      struct    p {
  29.              int    ord;
  30.              double    coef[MAX_ORDER];
  31. } poly;
  32.  
  33. extern     int        modrf();
  34. extern     int        numroots();
  35. extern     int        numchanges();
  36. extern     int        buildsturm();
  37.  
  38. extern     double    evalpoly();
  39.     
  40.  
  41.